﻿using System;
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Text;

namespace MAUtil
{
    public class Tool
    {
        /// <summary>
        /// MD5加密
        /// </summary>
        /// <param name="strText"></param>
        /// <returns></returns>
        public static string GetMD5(string strText) 
        { 
            MD5 md5 = new MD5CryptoServiceProvider();
            byte[] result = md5.ComputeHash(System.Text.Encoding.UTF8.GetBytes(strText));
            return BitConverter.ToString(result).Replace("-", ""); 
        }
    }
}
